import { ApiProperty } from '@nestjs/swagger'
import { IsNotEmpty, IsOptional } from 'class-validator'

export class CreateTransferDto {
  @ApiProperty({ description: '员工ID', example: 1 })
  @IsNotEmpty({ message: '员工ID不能为空' })
  staffId: number
  @ApiProperty({ description: '调动前部门', example: '1' })
  @IsNotEmpty({ message: '调动前部门不能为空' })
  beforeDepartmentId: number
  @ApiProperty({ description: '调动后部门', example: '2' })
  @IsNotEmpty({ message: '调动后部门不能为空' })
  afterDepartmentId: number
  @ApiProperty({ description: '调动前职位', example: '1' })
  @IsNotEmpty({ message: '调动前职位不能为空' })
  beforeJobId: number
  @ApiProperty({ description: '调动后职位', example: '2' })
  @IsNotEmpty({ message: '调动后职位不能为空' })
  afterJobId: number
  @ApiProperty({ description: '调动原因', example: '调动' })
  @IsNotEmpty({ message: '调动原因不能为空' })
  reason: string
  @ApiProperty({ description: '调动日期', example: '2021-01-01' })
  @IsOptional()
  remark?: string
}
